package basicproxy;

public class CountProxy implements Count {

	private CountImpl countImpl;
	
	
	
	public CountProxy(CountImpl countImpl) {
		super();
		this.countImpl = countImpl;
	}

	
	
	public CountProxy() {
		super();
	}



	@Override
	public void queryCount() {
		System.out.println("事务处理之前");
		countImpl.queryCount();
		System.out.println("事务处理之后");
		
	}

	@Override
	public void updateCount() {
		System.out.println("事务处理之前");
		countImpl.updateCount();
		System.out.println("事务处理之后");
	}



	public CountImpl getCountImpl() {
		return countImpl;
	}



	public void setCountImpl(CountImpl countImpl) {
		this.countImpl = countImpl;
	}

}
